//
//  OneViewController.m
//  07-UITabbarController
//
//  Created by dllo on 16/7/22.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "OneViewController.h"
#import "NEWViewController.h"

@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"左按钮" style:UIBarButtonSystemItemAdd target:self action:@selector(clickLeftBtn:)];
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    btn.frame = CGRectMake(10, 70, 100, 100);
    btn.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:btn];
    [btn addTarget:self action:@selector(addTargetBtn:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)addTargetBtn:(UIButton *)sender {
    NEWViewController *new = [[NEWViewController alloc] init];
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:new];
    [self presentViewController:nav animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
